<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Gloze: Cardinality Restrictions</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Gloze
   &#160;<span id="projectnumber">1.01-beta2</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">Cardinality Restrictions </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>By looking at attribute usage and element occurrence we can derive the appropriate OWL cardinality restrictions. Cardinality restrictions are derived from occurrence constraints on particles. For straightforward content there is almost a direct mapping from occurrences to cardinality. Elements occur once by default, and attributes are optional. We can also change minOccurs and maxOccurs on an element and this will be directly reflected in the OWL cardinality constraint. However, this belies a significant difference between occurrence constraints and cardinality restrictions. An occurrence constraint in XML schema refers to the occurrence of content at a given lexical position in the document. Similar content may occur at different positions within the same particle. In contrast, Cardinality restrictions limit the total number of appearances of a property in the context of a given class.</p>
<p>The following example shows how cardinality restrictions are derived from occurrence constraints on complex content. The content of the 'all' compositor and sub-element 'foo' occur once by default. The maximum number of occurrences of 'bar' is unbounded. By default, the use of attribute 'baz' is optional.</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
&lt;xs:schema xmlns:xs=<span class="stringliteral">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> targetNamespace=<span class="stringliteral">&quot;http://example.org/&quot;</span> xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span>&gt;
        &lt;xs:element name=<span class="stringliteral">&quot;foo&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;
        &lt;xs:element name=<span class="stringliteral">&quot;bar&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;
        
        &lt;xs:complexType name=<span class="stringliteral">&quot;Foobar&quot;</span>&gt;
                &lt;xs:all&gt;
                        &lt;xs:element ref=<span class="stringliteral">&quot;foo&quot;</span>/&gt;
                        &lt;xs:element ref=<span class="stringliteral">&quot;bar&quot;</span> maxOccurs=<span class="stringliteral">&quot;unbounded&quot;</span>/&gt;
                &lt;/xs:all&gt;
                &lt;xs:attribute name=<span class="stringliteral">&quot;baz&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;
        &lt;/xs:complexType&gt;

&lt;/xs:schema&gt;
</pre></div><p>Cardinality restrictions only constrain the number of occurences of a property in the context of a given class. They don't affect global property definitions. Property 'foo' is restricted to a cardinality of 1, while property 'bar' has a <em>minimum</em> cardinality of 1 (the maximum is unlimited). The optional attribute 'baz' has a maximum cardinality of 1 - occurring at most once. Note also, that because 'baz' is a locally defined attribute, it alone has an additional value constraint. The type of 'baz' is local to the class, whereas the ranges of 'foo' and 'bar' are globally defined.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix rdfs:    &lt;http:<span class="comment">//www.w3.org/2000/01/rdf-schema#&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix owl:     &lt;http:<span class="comment">//www.w3.org/2002/07/owl#&gt; .</span>
@prefix xsd:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

ns1:bar
      a       rdf:Property , owl:DatatypeProperty ;
      rdfs:range xsd:<span class="keywordtype">string</span> .

ns1:foo
      a       rdf:Property , owl:DatatypeProperty ;
      rdfs:range xsd:<span class="keywordtype">string</span> .

&lt;http:<span class="comment">//example.org/cardinality1.owl&gt;</span>
      a       owl:Ontology .

ns1:Foobar
      a       owl:Class ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:allValuesFrom xsd:string ;
                owl:onProperty ns2:baz
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:minCardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                owl:onProperty ns1:bar
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:maxCardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                owl:onProperty ns2:baz
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:cardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                owl:onProperty ns1:foo
              ] .

ns2:baz
      a       rdf:Property , owl:DatatypeProperty .
</pre></div><p>An occurrence constraint in XML schema refers to the occurrence of content at a particular lexical position in the document. Similar content may occur at a different position <em>within the same particle</em>. This is demonstrated in the following example, where a single element 'foo' may be followed (in sequence) by yet another element 'foo'. Because these are both properties of the same resource we calculate the cardinality of 'foo' by summing repeated occurrences.</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
&lt;xs:schema xmlns:xs=<span class="stringliteral">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> targetNamespace=<span class="stringliteral">&quot;http://example.org/&quot;</span> xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span>&gt;       
        &lt;xs:element name=<span class="stringliteral">&quot;foo&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;
        
        &lt;xs:element name=<span class="stringliteral">&quot;foofoo&quot;</span>&gt;
                &lt;xs:complexType&gt;
                        &lt;xs:sequence&gt;
                                &lt;xs:element ref=<span class="stringliteral">&quot;foo&quot;</span> /&gt;
                                &lt;xs:element ref=<span class="stringliteral">&quot;foo&quot;</span> /&gt;
                        &lt;/xs:sequence&gt;
                &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;

&lt;/xs:schema&gt;
</pre></div><p>Summing the occurrences of 'foo' makes for a cardinality of 2, right? Wrong. The OWL below has a <em>maximum</em> cardinality of 2, but a minimum cardinality of 1.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix rdfs:    &lt;http:<span class="comment">//www.w3.org/2000/01/rdf-schema#&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix owl:     &lt;http:<span class="comment">//www.w3.org/2002/07/owl#&gt; .</span>
@prefix xsd:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

&lt;http:<span class="comment">//example.org/cardinality2.owl&gt;</span>
      a       owl:Ontology .

ns1:foo
      a       rdf:Property , owl:DatatypeProperty ;
      rdfs:range xsd:<span class="keywordtype">string</span> .

ns1:foofoo
      a       owl:ObjectProperty ;
      rdfs:range
              [ a       owl:Class ;
                rdfs:subClassOf
                        [ a       owl:Restriction ;
                          owl:minCardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                          owl:onProperty ns1:foo
                        ] ;
                rdfs:subClassOf
                        [ a       owl:Restriction ;
                          owl:maxCardinality <span class="stringliteral">&quot;2&quot;</span>^^xsd:int ;
                          owl:onProperty ns1:foo
                        ]
              ] .
</pre></div><p>There is an edge case where there may be two occurrences of 'foo' but only one <em>distinct</em> property/value pair. This happens if both occurrences have the same literal value, as demonstrated below. Both occurrences map to the same statement [ ns1:foo "foo"^^xs_:string ] (with the same subject). Because these are <em>logical</em> statements it makes no difference how many times they are asserted, it amounts to saying the same thing twice. The actual cardinality of 'foo' in this case is 1. Because of this, the minimum cardinality of any datatype property will never exceed 1.</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
&lt;foofoo xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span>&gt;
        &lt;foo&gt;foo&lt;/foo&gt;
        &lt;foo&gt;foo&lt;/foo&gt;
&lt;/foofoo&gt;
</pre></div><p>The two elements above amount to saying the same thing twice.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

&lt;http:<span class="comment">//example.org/cardinality2.xml&gt;</span>
      ns1:foofoo
              [ ns1:foo <span class="stringliteral">&quot;foo&quot;</span>^^xs_:string
              ] .
</pre></div><p>Does this mean we lose information and can't achieve the reverse mapping back into RDF? If the number of times something was asserted is significant we have to record the sequence in which they occur. The example below shows how each occurrence of the element has been <em>reified</em>, making each an objectified resource in its own right, with its own identity. Each reified 'foo' is added to the object (of 'foofoo') as an rdf:Seq in their correct lexical order. With this additional metadata we see that there are two identical statements. This sequencing information is viewed as a data-structuring issue and is not modelled ontologically.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

&lt;http:<span class="comment">//example.org/cardinality2a.xml&gt;</span>
      ns1:foofoo _:b1 .

_:b1  a       rdf:Seq ;
      rdf:_1  [ a       rdf:Statement ;
                rdf:<span class="keywordtype">object</span> <span class="stringliteral">&quot;foo&quot;</span>^^xs_:string ;
                rdf:predicate ns1:foo ;
                rdf:subject _:b1
              ] ;
      rdf:_2  [ a       rdf:Statement ;
                rdf:<span class="keywordtype">object</span> <span class="stringliteral">&quot;foo&quot;</span>^^xs_:string ;
                rdf:predicate ns1:foo ;
                rdf:subject _:b1
              ] ;
      ns1:foo <span class="stringliteral">&quot;foo&quot;</span>^^xs_:<span class="keywordtype">string</span> .
</pre></div><p>Compositors like sequence, choice, all (and group references) are not directly represented in OWL because they are concerned with the lexical form of a document. However, their effect is to modulate the occurrences of elements within a particle. Like elements the maximum is set by maxOccurs, and the minimum by minOccurs. With nested compositors, the cardinality is calculated by multiplying nested elements by the occurrence constraints on the compositor. By default, the sequence compositor has a minimum and maximum factor of 1. The choice compositor has a maximum factor of 1, but an overriding minimum factor of 0 because all but one of its elements will not occur at all.</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
&lt;xs:schema targetNamespace=<span class="stringliteral">&quot;http://example.org/&quot;</span> xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span> xmlns:xs=<span class="stringliteral">&quot;http://www.w3.org/2001/XMLSchema&quot;</span>&gt;
        &lt;xs:element name=<span class="stringliteral">&quot;foo&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;
        &lt;xs:element name=<span class="stringliteral">&quot;bar&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;
        &lt;!-- minimum cardinality of 0 <span class="keywordflow">for each</span> choice --&gt;
        &lt;xs:complexType name=<span class="stringliteral">&quot;Foobar&quot;</span> mixed=<span class="stringliteral">&quot;true&quot;</span>&gt;
                &lt;xs:sequence maxOccurs=<span class="stringliteral">&quot;2&quot;</span>&gt;
                        &lt;xs:choice maxOccurs=<span class="stringliteral">&quot;2&quot;</span>&gt;
                                &lt;xs:element ref=<span class="stringliteral">&quot;foo&quot;</span>/&gt;
                                &lt;xs:element ref=<span class="stringliteral">&quot;bar&quot;</span> maxOccurs=<span class="stringliteral">&quot;unbounded&quot;</span>/&gt;
                        &lt;/xs:choice&gt;
                &lt;/xs:sequence&gt;
        &lt;/xs:complexType&gt;
&lt;/xs:schema&gt;
</pre></div><p>The minimum cardinality of both 'foo' and 'bar' is 1*0*1 = 0. The maximum cardinality of both 'foo' and 'bar' is 2*2*1 = 4.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix rdfs:    &lt;http:<span class="comment">//www.w3.org/2000/01/rdf-schema#&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix owl:     &lt;http:<span class="comment">//www.w3.org/2002/07/owl#&gt; .</span>
@prefix xsd:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

ns1:bar
      a       rdf:Property , owl:DatatypeProperty ;
      rdfs:range xsd:<span class="keywordtype">string</span> .

&lt;http:<span class="comment">//example.org/cardinality3.owl&gt;</span>
      a       owl:Ontology .

ns1:foo
      a       rdf:Property , owl:DatatypeProperty ;
      rdfs:range xsd:<span class="keywordtype">string</span> .

ns1:Foobar
      a       owl:Class ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:maxCardinality <span class="stringliteral">&quot;4&quot;</span>^^xsd:int ;
                owl:onProperty ns1:foo
              ] .
</pre></div><p>Another feature that will affect cardinality is the appearance of an xs:any wild-card. We have to count how many of these could match other elements in the particle and increment their cardinalities accordingly. The schema below includes an element 'foo' followed by a selection of xs:any elements that may, in principle, match yet another occurrence of 'foo'. We count how many of these may match 'foo' and increment its min and max cardinalities. The last two xs:any cannot match 'foo'. The 'foo' element is defined in the target namespace, but '##other' will only match an element in another namespace, while '##local' will only match a local, unqualified element.</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
&lt;xs:schema xmlns:xs=<span class="stringliteral">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> 
        targetNamespace=<span class="stringliteral">&quot;http://example.org/&quot;</span> xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span>&gt;
        
        &lt;xs:element name=<span class="stringliteral">&quot;foo&quot;</span> type=<span class="stringliteral">&quot;xs:string&quot;</span>/&gt;

        &lt;!-- element foo has max cardinality 4 --&gt;
        &lt;xs:complexType name=<span class="stringliteral">&quot;Any&quot;</span>&gt;
                &lt;xs:sequence&gt;
                        &lt;xs:element ref=<span class="stringliteral">&quot;foo&quot;</span> /&gt;
                        &lt;xs:any <span class="keyword">namespace</span>=<span class="stringliteral">&quot;http://example.org&quot;</span>/&gt;
                        &lt;xs:any <span class="keyword">namespace</span>=<span class="stringliteral">&quot;##any&quot;</span>/&gt;
                        &lt;xs:any <span class="keyword">namespace</span>=<span class="stringliteral">&quot;##targetNamespace&quot;</span>/&gt;
                        &lt;xs:any <span class="keyword">namespace</span>=<span class="stringliteral">&quot;##other&quot;</span>/&gt;
                        &lt;xs:any <span class="keyword">namespace</span>=<span class="stringliteral">&quot;##local&quot;</span>/&gt;
                &lt;/xs:sequence&gt;
        &lt;/xs:complexType&gt;
        
&lt;/xs:schema&gt;
</pre></div><p>As for other properties that may potentially match xs:any, there are no specific restrictions that can be derived from the schema. In an open-world we may pass over them in silence.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix rdfs:    &lt;http:<span class="comment">//www.w3.org/2000/01/rdf-schema#&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix owl:     &lt;http:<span class="comment">//www.w3.org/2002/07/owl#&gt; .</span>
@prefix xsd:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

&lt;http:<span class="comment">//example.org/cardinality4.owl&gt;</span>
      a       owl:Ontology .

ns1:foo
      a       rdf:Property , owl:DatatypeProperty ;
      rdfs:range xsd:<span class="keywordtype">string</span> .

ns1:Any
      a       owl:Class ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:minCardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                owl:onProperty ns1:foo
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:maxCardinality <span class="stringliteral">&quot;4&quot;</span>^^xsd:int ;
                owl:onProperty ns1:foo
              ] .
</pre></div><p>The final feature relevant to cardinality is the use of substitution groups.</p>
<div class="fragment"><pre class="fragment">&lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> encoding=<span class="stringliteral">&quot;UTF-8&quot;</span>?&gt;
&lt;xs:schema xmlns:xs=<span class="stringliteral">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> 
        targetNamespace=<span class="stringliteral">&quot;http://example.org/&quot;</span> xmlns=<span class="stringliteral">&quot;http://example.org/&quot;</span> &gt;
        
        &lt;xs:element name=<span class="stringliteral">&quot;foo&quot;</span> /&gt;       
        &lt;xs:element name=<span class="stringliteral">&quot;bar&quot;</span> substitutionGroup=<span class="stringliteral">&quot;foo&quot;</span> /&gt;
        &lt;xs:element name=<span class="stringliteral">&quot;foobar&quot;</span> type=<span class="stringliteral">&quot;Foobar&quot;</span> /&gt;
        
        &lt;xs:complexType name=<span class="stringliteral">&quot;Foobar&quot;</span>&gt;
                &lt;xs:sequence&gt;
                        &lt;xs:element ref=<span class="stringliteral">&quot;foo&quot;</span> /&gt;
                        &lt;xs:element ref=<span class="stringliteral">&quot;bar&quot;</span> /&gt;
                &lt;/xs:sequence&gt;
        &lt;/xs:complexType&gt;

&lt;/xs:schema&gt;
</pre></div><p>The member element 'bar' can substitute for the head element 'foo', so the content may include up to 2 'bar's (we assume there may be other potential sub-properties that could also substitute for 'foo'). Conversely, as 'bar' is a sub-property of 'foo' each 'bar' statement implies a 'foo' statement. There are therefore up to 2 'foo's. Ordinarily, we might conclude that exactly two 'foo's are implied, but there is again the possibility that we might have two identical literal values.</p>
<div class="fragment"><pre class="fragment">@prefix ns2:     &lt;http:<span class="comment">//example.org/def/&gt; .</span>
@prefix rdfs:    &lt;http:<span class="comment">//www.w3.org/2000/01/rdf-schema#&gt; .</span>
@prefix ns1:     &lt;http:<span class="comment">//example.org/&gt; .</span>
@prefix xs_:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix owl:     &lt;http:<span class="comment">//www.w3.org/2002/07/owl#&gt; .</span>
@prefix xsd:     &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema#&gt; .</span>
@prefix rdf:     &lt;http:<span class="comment">//www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .</span>
@prefix xs:      &lt;http:<span class="comment">//www.w3.org/2001/XMLSchema&gt; .</span>

ns1:bar
      a       rdf:Property ;
      rdfs:subPropertyOf ns1:foo .

ns1:foobar
      a       owl:ObjectProperty ;
      rdfs:range ns1:Foobar .

ns1:foo
      a       rdf:Property .

ns1:Foobar
      a       owl:Class ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:minCardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                owl:onProperty ns1:bar
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:minCardinality <span class="stringliteral">&quot;1&quot;</span>^^xsd:int ;
                owl:onProperty ns1:foo
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:maxCardinality <span class="stringliteral">&quot;2&quot;</span>^^xsd:int ;
                owl:onProperty ns1:bar
              ] ;
      rdfs:subClassOf
              [ a       owl:Restriction ;
                owl:maxCardinality <span class="stringliteral">&quot;2&quot;</span>^^xsd:int ;
                owl:onProperty ns1:foo
              ] .

&lt;http:<span class="comment">//example.org/substitution.owl&gt;</span>
      a       owl:Ontology .
</pre></div> </div></div>


<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 15 2011 22:13:50 for Gloze by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
